package net.neptech.model.emum;

import lombok.Getter;

@Getter
public enum AnnErrorEnum {

    // --------- 通用HTTP状态码 ---------
    // 2xx Success


    // product 3000-3999
//    PRODUCT_NOT_FOUND(3001, "商品信息不存在"),
//    PRODUCT_STOCK_NOT_ENOUGH(3002, "商品库存不足"),
//    PRODUCT_OFF_SHELF(3003, "商品已下架"),
//    PRODUCT_INVALID(3004, "商品信息无效"),

    SLOT_NOT_ENOUGH(1234, "号池不足,请稍后预约"),

    SLOT_NOT_FOUND(1235, "号源不存在"),

    LOCKED(1237, "请不要操作太快"),
    // order 5000-5999
//    ORDER_ADD_FAIL(5001, "订单添加失败"),
//    ORDER_NOT_FOUND(5002, "订单不存在"),
//    ORDER_STATUS_ERROR(5003, "订单状态异常"),
//    ORDER_PAY_TIMEOUT(5004, "订单支付超时"),
//    ORDER_CANCELLED(5005, "订单已取消"),
    ORDER_PAYMENT_PENDING(1236, "你有待支付的订单"),
    // 取消失败
    CANCEL_FAILED(1238, "取消预约失败"),
    INTERNAL_SERVER_ERROR(1239,"查询历史记录失败" );
    // auth 4100-4199

    private final int code;
    private final String msg;

    AnnErrorEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }



    @Override
    public String toString() {
        return code + " : " + msg;
    }
}

